require(File.join(RAILS_ROOT, 'config', 'boot'))
require(File.join(RAILS_ROOT, 'config', 'environment'))
require(File.join(RAILS_ROOT, 'app', 'models', 'morning_star_report'))

desc "download all MorningStar reports to local cache"
task :download_reports do
  MorningStarReport.find_all.each do |report|
    puts "LOADING REPORT : #{report.date}"
    report.load
  end
end 

desc "clear all cached files"
task :clear do
  system "rm -rf #{MorningStarReport::CACHED_REPORTS}/*"
end